home *** CD-ROM | disk | FTP | other *** search
- Path: grimsel.zurich.ibm.com!usenet
- From: Keith Whittingham <wgk@zurich.ibm.com>
- Newsgroups: comp.lang.c
- Subject: Re: How can you make this work?
- Date: Sun, 14 Apr 1996 19:07:05 -0700
- Organization: IBM Zurich Research Laboratory
- Message-ID: <3171AF49.47D@zurich.ibm.com>
- References: <4kr886$13t@hermes.oanet.com>
- NNTP-Posting-Host: pine.zurich.ibm.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.01 (Win16; I)
-
- scorpion@portal.connect.ab.ca wrote:
- >
- > I need to know why this gives an 'Illegal Pointer
- > Arithmetic' error ; It's supposed to be a pixel write routine:
- >
- > void putpixel(short x,short y,unsigned char colour)
- > { char far *Startofvidmem;
- > char far *Location; /* Address of where to write the
- > pixel*/
- > Startofvidmem = 0xA000;
- >
- > Location = Startofvidmem + (y*320) + x;
- > *Location = colour;
- > }
- >
- > Thanx in advance!
- > John Smith
-
- It should work but I would stick a few more zero's in the address
- of the video buffer if you're working on a PC...
-
- Try 0xA0000000.
-
-
- --
- Keith Whittingham
- wgk@zurich.ibm.com
-